<!-- 展示客服二维码 -->
<template>
    <u-popup
        :show="show"
        mode="center"
        :safeAreaInsetBottom="false"
        round="8"
        @close="$emit('update:show', false)"
    >
        <view class="box">
            <view class="title">
                联系客服
                <uni-icons class="closeIcon" type="close" size="50rpx" @tap="$emit('update:show', false)" />
            </view>
            <u--image :showLoading="true" src="https://cdn.uviewui.com/uview/album/1.jpg" width="320rpx" height="320rpx" />
            <view class="save" @tap="save">
                保存二维码
            </view>
        </view>
    </u-popup>
</template>

<script>
    export default {
        name:"customerService",
        props: {
            show: Boolean,
            title: {
                type: String,
                default: '添加客服微信'
            }
        },
        data() {
            return {
                
            };
        },
        methods: {
            save() {
                this.$downLoadImg('https://cdn.uviewui.com/uview/album/1.jpg')
            }
        }
    }
</script>

<style lang="scss" scoped>
    .box {
        width: 600rpx;
        padding: 0 30rpx;
        background: $uni-bg-color-modal;
        display: flex;
        flex-direction: column;
        align-items: center;
        border-radius: 8px;
        font-family: Roboto, Roboto;
        
        .title {
            margin: 45rpx 0;
            width: 100%;
            position: relative;
            text-align: center;
            font-size: 36rpx;
            color: $uni-text-color-black;
            .closeIcon {
                position: absolute;
                right: 0;
            }
        }
        
        .save {
            margin: 50rpx 0;
            width: 100%;
            height: 100rpx;
            border-radius: 100rpx;
            border: 2rpx solid $uni-color-primary;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 32rpx;
            color: $uni-color-primary;
        }
    }
</style>